//
// Created by sjjmw on 3/24/2022.
//

//应该使用dfs

#include "iostream"
#include "vector"
#include "list"
#include "algorithm"
#include "string"
#include "unordered_map"
#include "cmath"
#include<iomanip>
#include "string"
#include "map"
#include "list"
struct Range{
    int r;
    int l;
};
bool cmp(Range&r1,Range&r2){
    if(r1.l==r2.l){
        return r1.r<r2.r;
    }
    return r1.l<r2.l;
}
struct Sol{
    std::vector<char> has_xj;
    int cnt=0;
    void dfs(int pos){
        if(pos==has_xj.size()-1){
            cnt++;
            return;
        }
        if(pos>has_xj.size()-1){
            return;
        }
        if(has_xj[pos]){
            return;
        }
        dfs(pos+1);
        dfs(pos+2);
    }
//    std::vector<Range> ranges;
    void handle(
            int n,int b
            ){
        has_xj.resize(n);
        for(int i=0;i<b;i++){
            int in;std::cin>>in;
            has_xj[in-1]=1;
        }
        dfs(0);
        printf("%d\n",cnt);
    }
};
int main(){
    int a,b,c;
//    float a,b,c,d;
    int e;
    while(std::cin>>a>>b){
        Sol().handle(a,b);
    }

    return 0;
}